//
//  AllGoodsTopView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/9.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "AllGoodsTopView.h"

@implementation AllGoodsTopView
-(id)initWithFrame:(CGRect)aFrame inSuperView:(UIView *)aSuperView{
    if (self = [super initWithFrame:aFrame inSuperView:aSuperView]) {
        self.backgroundColor = [UIColor whiteColor];
        GLGWLabel * inSaleGoods = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self];
        inSaleGoods.text = @"在售商品";
        if (self.accountType == AccountType_FreeManagers) {
            inSaleGoods.font = BOLDSYSTEMFONT(16);
        }
        [inSaleGoods mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self.mas_top).offset(kHeightProportion_In_iPhoneTriploid(12));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        //
        GLGWButton * shaiXunBut = [[GLGWButton alloc] initWithTitle:@"筛选" titleLableFont:SYSTEMFONT(14) titleLableColor:kColor_Rule_Black inSuperView:self];
//        shaiXunBut.backgroundColor = kRandomColor;
        [shaiXunBut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.right.bottom.equalTo(self).offset(0);
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(85)));
        }];
        //
        GLGWView * lineView = [[GLGWView alloc] initWithInSuperView:self];
        lineView.backgroundColor = [UIColor colorWithHexString:@"#EAEAEA"];
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.bottom.right.equalTo(self).offset(0);
            make.height.equalTo(@(1));
        }];
        
        
    }
    return self;
}
@end
